package cn.icanci.loopstack.ddk.common.socket.load;

import java.io.Serializable;
import java.util.Objects;

/**
 * 资源值对象
 * 
 * @author icanci
 * @since 1.0 Created in 2023/01/09 22:30
 */
public class ResourceValueObjectDTO implements Serializable {
    /** 资源 */
    private String resource;
    /** 资源值 */
    private String value;

    public ResourceValueObjectDTO() {
    }

    public ResourceValueObjectDTO(String resource, String value) {
        this.resource = resource;
        this.value = value;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        ResourceValueObjectDTO that = (ResourceValueObjectDTO) o;
        return Objects.equals(resource, that.resource) && Objects.equals(value, that.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(resource, value);
    }
}
